<?php


namespace app\model;


use think\Model;

class articleType extends Model
{
    protected $table = 'classify';
    protected $key = 'id';
    // 设置字段信息
    protected $schema = [
        'id' => 'int',
        'typeName' => 'varchar',
    ];

    // 相对关联 文章
    public function article()
    {
        return $this->belongsTo(ArticleModel::class,'articleTypeId','id');
    }
}